Do read it over before sending/presenting/submitting
Aside: Citing Sources
When are citations needed?
“We will be doing our analysis using two different data sets created by two different groups: Donohue and Mustard + Lott, or simply Lott”
“What turned from the idea of carrying firearms to protect oneself from enemies such as the British monarchy and the unknown frontier of North America has now become a nationwide issue.”
“Right to Carry Laws refer to laws that specify how citizens are allowed to carry concealed handguns when they’re away from home without a permit”
“In this case study, we are examining the relationship between unemployment rate, poverty rate, police staffing, and violent crime rate.”
“In the United States, the second amendment permits the right to bear arms, and this law has not been changed since its creation in 1791.”
“The Right to Carry Laws (RTC) is defined as”a law that specifies if and how citizens are allowed to have a firearm on their person or nearby in public.””
Reminder: You do NOT get docked points for citing others’ work. You can be at risk of AI Violation if you don’t. When in doubt, give credit.
Footnotes in .Rmd
How to specify a footnote in text:
Here is some body text.[^1]
How to include the footnote’s reference:
[^1]: This footnote will appear at the bottom of the page.
Effective Visual Communication
Brainstorm: Advice You’ve Been Given?
Student Responses
Student responses will be added to notes after class…
The Glamour of Graphics
builds on top of the grammar (components) of a graphic
considerations for the design of a graphic
color, typography, layout
going from accurate to 😍effective
Left-align titles at top-left
😬 Accurate
ggplot(penguins, aes(x = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme(axis.text.x =element_text(angle =90, vjust =0.5, hjust =1))
😍 Effective
ggplot(penguins, aes(x = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme(axis.text.x =element_text(angle =90, vjust =0.5, hjust =1),plot.title.position ="plot")
Avoid head-tilting
😬 Accurate
ggplot(penguins, aes(x = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme(axis.text.x =element_text(angle =90, vjust =0.5, hjust =1),plot.title.position ="plot")
😍 Effective
ggplot(penguins, aes(y = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme(plot.title.position ="plot")
Borders & Backgrounds: 👎
😬 Accurate
ggplot(penguins, aes(y = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme_bw() +theme(plot.title.position ="plot")
😍 Effective
ggplot(penguins, aes(y = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme_minimal() +theme(plot.title.position ="plot")
Organize & Remove/Lighten as much as possible
😬 Accurate
ggplot(penguins, aes(y = species, fill = species)) +geom_bar() +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme_minimal() +theme(plot.title.position ="plot")
😍 Effective
ggplot(penguins, aes(y =fct_rev(fct_infreq(species)), fill = species)) +geom_bar() +geom_text(stat='count', aes(label=..count..), hjust =1.5, color ="white", size =6) +scale_x_continuous(expand =c(0, 0)) +scale_fill_manual(values =c("#454545", rep("#adadad", 2))) +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme_minimal(base_size =18) +theme(axis.text.x =element_blank(),plot.title.position ="plot", panel.grid.major =element_blank(), panel.grid.minor =element_blank(),axis.title =element_blank())
Legends suck
😬 Accurate
ggplot(penguins, aes(y =fct_rev(fct_infreq(species)), fill = species)) +geom_bar() +geom_text(stat='count', aes(label=..count..), hjust =1.5, color ="white", size =6) +scale_x_continuous(expand =c(0, 0)) +scale_fill_manual(values =c("#454545", rep("#adadad", 2))) +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme_minimal(base_size =18) +theme(axis.text.x =element_blank(),plot.title.position ="plot", panel.grid.major =element_blank(), panel.grid.minor =element_blank(),axis.title =element_blank())
😍 Effective
ggplot(penguins, aes(y =fct_rev(fct_infreq(species)), fill = species)) +geom_bar() +geom_text(stat='count', aes(label=..count..), hjust =1.5, color ="white", size =7) +scale_x_continuous(expand =c(0, 0)) +scale_fill_manual(values =c("#454545", rep("#adadad", 2))) +labs(title ="Adelie Penguins are the most common in Antarctica", subtitle ="Frequency of each penguin species studied near Palmer Station, Antarctica") +theme_minimal(base_size =20) +theme(axis.text.x =element_blank(),plot.title.position ="plot", panel.grid.major =element_blank(), panel.grid.minor =element_blank(),axis.title =element_blank(),legend.position ="none")
Additional Guidance
White space is like garlic - take the amount you need and triple it